<?php
/**
 * @file
 * Returns the HTML for a single Drupal page.
 *
 * Complete documentation for this file is available online.
 * @see https://drupal.org/node/1728148
 */
global $theme_path;
?>

<?php print render($page['navigation']); ?>

<div id="page">
    <?php print render($page['help']); ?>

	<header class="header" id="header" role="banner">
		<div class="wrapper">

			<div class="menu-trigger"></div>
			<div class="search-trigger"></div>
			<div class="font-size-trigger"></div>
			<?php if ($logo): ?>
			<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="header__logo" id="logo">
                <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" class="header__logo-image" />
			</a>
			<?php endif; ?>

			<?php print render($page['header']); ?>

		</div>
	</header>

	<div id="main">
        <?php print $messages; ?>
        <?php print render($page['highlighted']); ?>

        <?php if ($title): ?>
        <h1 class="page__title title element-invisible" id="page-title"><?php print $title; ?></h1>
        <?php endif; ?>

    <?php print bck_render_('ads-mobile-top-320x90'); ?>
        <?php print $breadcrumb; ?>

        <div id="content" class="column region-content" role="main">
            <article data-nid="<?php print $node->nid; ?>" class="app">

                <?php print bck_render_('ads-article-300x250'); ?>

                <div class="wrapper">
                    <div class="article-inner">
                        <?php print render($title_prefix); ?>
                        <?php print render($title_suffix); ?>
                        <?php print render($tabs); ?>
                        <?php if ($action_links): ?>
                        <ul class="action-links"><?php print render($action_links); ?></ul>
                        <?php endif; ?>

                        <div class="article-top">
                            <?php echo jessica_thm_author_author_section($node); ?>
                            <div class="article-share-amount">
                                <?php if (!empty($node->field_social_count)): ?>
                                    <?php print $node->field_social_count['und'][0]['value']; ?>
                                <?php else: ?>
                                    0
                                <?php endif; ?>SHARES</div>
                            <div class="article-share-action">
                                <a href="#" class="article-share-close icon icon-cross"></a>
                                <a href="#" class="article-share-icon icon icon-facebook"></a>
                                <a href="#" class="article-share-icon icon icon-sina"></a>
                                <a href="#" class="article-share-icon icon icon-whatsapp"></a>
                                <a href="#" class="article-share-icon icon icon-pinterest"></a>
                                <a href="#" class="article-share-icon icon icon-email"></a>
                                <a href="#" class="article-share-toggle icon icon-share"></a>
                            </div>
                        </div>

                        <div class="field-body">
                            <?php echo render_(field_view_field('node', $node, 'field_msw_image', array('label' => 'hidden', 'settings' => array('image_style' => 'medium')))); ?>
                            <?php echo render_(field_view_field('node', $node, 'body', array('label' => 'hidden'))); ?>
                            <?php $body =  render_(field_view_field('node', $node, 'field_body', array('label' => 'hidden'))); ?>
                            <?php $body .=  render_(field_view_field('node', $node, 'field_award_history', array('label' => 'hidden'))); ?>
                            <?php $b = trim(strip_tags($body));?>
                            <?php if (!empty($b)): ?>
                                <h3 class="profile-title">簡歷</h3>
                            <?php endif;?>
                            <?php echo $body;?>
                        </div>
                        <?php print render($page['sidebar_first']); ?>

                        <?php print _get_block('scmedia_fb_comment','facebook_comment'); ?>

                        <div class="article-readmore">
                            <a href="#">Read More</a>
                        </div>
                    </div>

                    <?php print render($page['sidebar_second']); ?>
                    <?php echo bck_render_('msw-related-articles');?>

                    <?php echo bck_render_('ads-mobile-top-2-300x300');?>
	                <?php
                        print views_embed_view('most_read','block_2', $node->nid);
	                ?>


                    <?php //print render($page['content']); ?>
                    <?php //print $feed_icons; ?>
                </div>
            </article>
            <div id="article-loading"></div>
        </div>
        <?php //print render($page['below_content']); ?>
        <?php print render($page['bottom']); ?>
        <?php print render($page['footer']); ?>
	</div>

</div>

<?php print render($page['popup']); ?>
<?php print render($page['overlay']); ?>
<?php print render($page['hidden']); ?>
